﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SitePublico.Master" AutoEventWireup="true" CodeBehind="fmSubmeter.aspx.cs" Inherits="WEB.fmSubmeter" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


    <asp:UpdatePanel ID="updPanel" runat="server">
        <ContentTemplate>
        
            <div align="center">
                <div class="alert-message error">
                    <asp:Label ID="lblErro" runat="server" Font-Bold="True"></asp:Label>
                </div>
                <div class="alert-message success">
                    <asp:Label ID="lblSucesso" runat="server" Font-Bold="True" ></asp:Label>
                </div>
                <div class="alert-message alert">
                    <asp:Label ID="lblAviso" runat="server" Font-Bold="True" ></asp:Label>
                </div>
            </div>

            <asp:MultiView ID="mtv" runat="server">
                 <asp:View ID="viewInicial" runat="server" >
                    <asp:Panel ID="pnlInicial" runat="server">

                        <div class="SubPaginaTotal">

                            <div class="SubPaginaTitulo">Submeta uma Atividade!</div>
                            <div style="float:left; height:10px; width:515px; background-image:url(../Images/bg_pontilhado.png); margin:22px 0px 0px 10px;"></div>

                            <br clear="all" />



                            <div style="float:left; height:auto; width:100%">
                                <h1>
                                    1 - Informe Seus Dados
                                </h1>

                                <br clear="all" />

                                <div style="float:left; height:auto; width:100%; margin: 0px 0px 15px 0px;">
                                    Caso já possua um cadastro, basta informar o seu email e senha para submeter a atividade!
                                </div>

                                <div style="float:left; height:auto; width:100%; margin: 0px 0px 8px 0px;">


                                    <div style="float:left; height:auto; margin-left:0px;">
                                        <asp:Label ID="Label1" runat="server" AssociatedControlID="txtEmail" Text="Email:"></asp:Label><br />
                                        <asp:TextBox ID="txtEmail" runat="server" Width="300px" CssClass="textBox" AutoPostBack="true" OnTextChanged="txtEmail_OnTextChanged"></asp:TextBox>
                                    </div>

                                    <div style="float:left; height:auto; margin-left:10px;">
                                        <asp:Label ID="Label2" runat="server" AssociatedControlID="txtNomeCompleto" Text="Nome Completo:"></asp:Label><br />
                                        <asp:TextBox ID="txtNomeCompleto" runat="server" Width="300px" CssClass="textBox"></asp:TextBox>
                                    </div>

                                    <div style="float:left; height:auto; margin-left:10px;">
                                        <asp:Label ID="Label3" runat="server" AssociatedControlID="txtTelefone" Text="Telefone:"></asp:Label><br />
                                        <asp:TextBox ID="txtTelefone" runat="server" Width="120px" CssClass="textBox"></asp:TextBox>
                                        <asp:MaskedEditExtender ID="MEE_txtTelefone" 
                                        runat="server" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                                        CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                                        CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
                                        ClearMaskOnLostFocus="true"
                                        Mask="(99) 9999-9999" MaskType="Number" TargetControlID="txtTelefone">
                                    </asp:MaskedEditExtender>
                                    </div>

                                </div>

                                
                            <br clear="all" />
                            <div style="float:left; height:auto; width:100%;">
                                <div style="float:left; height:auto; margin-left:0px;">
                                    <asp:Label ID="Label9" runat="server" AssociatedControlID="txtSenha" Text="Senha:"></asp:Label><br />
                                    <asp:TextBox ID="txtSenha" runat="server" Width="135px" CssClass="textBox" TextMode="Password"></asp:TextBox>
                                </div>
                                <div style="float:left; height:auto; margin-left:10px;" runat="server" ID="div_confirmarSenha">
                                    <asp:Label ID="Label10" runat="server" AssociatedControlID="txtConfirmarSenha" Text="Confirmar Senha:"></asp:Label><br />
                                    <asp:TextBox ID="txtConfirmarSenha" runat="server" Width="135px" CssClass="textBox" TextMode="Password"></asp:TextBox>
                                </div>
                            </div>


                                <br clear="all" />

                                <h1>
                                    2 - Informe os Dados da Atividade
                                </h1>

                                <br clear="all" />

                                <div style="float:left; height:auto; width:100%; margin-left:0px;">

                                    <div style="float:left; height:auto; margin-left:0px;">
                                        <asp:Label ID="Label6" runat="server" AssociatedControlID="ddlDepartamento" Text="Departamento:"></asp:Label><br />
                                        <asp:DropDownList ID="ddlDepartamento" runat="server" CssClass="ddList"> </asp:DropDownList>
                                    </div>

                                    <div style="float:left; height:auto; margin-left:10px;">
                                        <asp:Label ID="Label5" runat="server" AssociatedControlID="ddlCategoria" Text="Categoria:"></asp:Label><br />
                                        <asp:DropDownList ID="ddlCategoria" runat="server" CssClass="ddList"> </asp:DropDownList>
                                    </div>


                                </div>

                                <br clear="all" />

                                <div style="float:left; height:auto; width:100%; margin-left:0px;">
                                    <div style="float:left; height:auto; margin-left:0px;">
                                        <asp:Label ID="Label8" runat="server" AssociatedControlID="txtTitulo" Text="Titulo:"></asp:Label><br />
                                        <asp:TextBox ID="txtTitulo" runat="server" Width="630px" CssClass="textBox"></asp:TextBox>
                                    </div>
                                    <div style="float:left; height:auto; margin-left:10px;">
                                        <asp:Label ID="Label14" runat="server" AssociatedControlID="txtTotalVagas" Text="Total Vagas:"></asp:Label><br />
                                        <asp:TextBox ID="txtTotalVagas" runat="server" Width="110px" CssClass="textBox"></asp:TextBox>
                                    </div>
                                </div>

                                <br clear="all" />

                                <div style="float:left; height:auto; width:100%; margin-left:0px;">
                                    <div style="float:left; height:auto; margin-left:0px;">
                                        <asp:Label ID="Label4" runat="server" AssociatedControlID="txtPreRequisitos" Text="Pré-Requisitos:"></asp:Label><br />
                                        <asp:TextBox ID="txtPreRequisitos" runat="server" Width="770px" CssClass="textBox"></asp:TextBox>
                                    </div>
                                </div>


                                <br clear="all" />

                                <div style="float:left; height:auto; width:100%; margin-left:0px;">
                                    <div style="float:left; height:auto; margin-left:0px;">
                                        <asp:Label ID="Label7" runat="server" AssociatedControlID="txtDescricao" Text="Descrição:"></asp:Label><br />
                                        <asp:TextBox ID="txtDescricao" runat="server" Width="770px" TextMode="MultiLine" Rows="3" CssClass="textBox"></asp:TextBox>
                                    </div>
                                </div>

                            </div>


                             <br clear="all" />

                            <div style="float:left; height:auto; width:100%; margin:8px 0px 0px 0px;">
                                <h1>
                                    3 - Informe seus Possivéis Horários Disponíveis
                                </h1>

                                <br clear="all" />

                                <div style="float:left; height:auto; width:100%; margin-left:0px;">
                                    <div style="float:left; height:auto; margin-left:0px;">
                                       <asp:Label ID="Label12" runat="server" AssociatedControlID="ddlQTDEncontros" Text="Quantidade de Encontros:"></asp:Label><br />
                                       <asp:DropDownList ID="ddlQTDEncontros" runat="server" CssClass="ddList" 
                                            AutoPostBack="true" 
                                            onselectedindexchanged="ddlQTDEncontros_SelectedIndexChanged">
                                       </asp:DropDownList>
                                    </div>
                                </div>


                                <br clear="all" />

                                <div style="float:left; height:auto; width:100%; margin-left:0px; margin-top:10px;">

                                    <asp:Repeater ID="rptHorarios" runat="server">
                                        <ItemTemplate>
                                            <div style="float:left; height:auto; width:100%; margin-left:0px;">
                                                <div style="float:left; height:auto; margin-left:0px; margin-top:10px; margin-top:20px; font-size:14px; font-weight:bold;">
                                                    <asp:Label ID="Label13" runat="server" Text='<%# Eval("numero") %>'></asp:Label>º - 
                                                </div>

                                                <div style="float:left; height:auto; margin-left:10px;">
                                                   <asp:Label ID="Label9" runat="server" AssociatedControlID="ddlDia" Text="Dia:"></asp:Label><br />
                                                   <asp:DropDownList ID="ddlDia" runat="server" CssClass="ddList"> </asp:DropDownList>
                                                </div>

                                                <div style="float:left; height:auto; margin-left:10px;">
                                                    <asp:Label ID="Label10" runat="server" AssociatedControlID="ddlTurno" Text="Turno:"></asp:Label><br />
                                                    <asp:DropDownList ID="ddlTurno" runat="server" CssClass="ddList"> 
                                                        <asp:ListItem Value="Manhã" Text="Manhã" ></asp:ListItem>
                                                        <asp:ListItem Value="Tarde" Text="Tarde" ></asp:ListItem>
                                                        <asp:ListItem Value="Noite" Text="Noite" ></asp:ListItem>
                                                    </asp:DropDownList>
                                                </div>

                                                <div style="float:left; height:auto; margin-left:10px;">
                                                    <asp:Label ID="Label11" runat="server" AssociatedControlID="txtDuracao" Text="Duração (em minutos):"></asp:Label><br />
                                                    <asp:TextBox ID="txtDuracao" runat="server" Width="120px" CssClass="textBox"></asp:TextBox>
                                                </div>
                                            </div>
                                            <br clear="all" />
                                        </ItemTemplate>
                                    </asp:Repeater>


                                </div>

                            </div>


        
                            <div style="float:left; height:auto; width:97.8%; margin:20px 0px 0px 0px; border-top:1px solid #CCC; padding:10px 0px 0px 0px;">
                                <asp:Button ID="btmSubmeter" runat="server" Text="Submeter" CssClass="btn primary" OnClick="btmSubmeter_Click" />
                            </div>

                        </div>

                        <br clear="all" />
                    </asp:Panel>
                </asp:View>

                
               <asp:View ID="viewSucesso" runat="server" >
                <div class="SubPaginaTitulo">Inscrição!</div>
                        <div style="float:left; height:10px; width:680px; background-image:url(../Images/bg_pontilhado.png); margin:22px 0px 0px 10px;"></div>

                        <br clear="all" />

                <center>
                    <h1>
                        Parabéns, sua inscrição foi realizar com sucesso!
                    </h1>

                    <h3>
                        Fique atento, um e-mail será enviado para confirmar essa submissão de atividade!
                    </h3>
                </center>
                   <asp:Label ID="lbl_MensagemSucesso" runat="server" Text=""></asp:Label>
               </asp:View>
            </asp:MultiView>
        </ContentTemplate>
    </asp:UpdatePanel>

    <!---->
    <asp:UpdateProgress DisplayAfter="1000" ID="updProgress" runat="server">
        <ProgressTemplate>
            <div class="updProgress">
            </div>
            <div class="updProgress_meio" id="updProgress_meio">
                <center>
                    <img ID="imgLoad" runat="server" src="~/Images/carregando.gif"/>
                    <br />
                    Executando processo...
                </center>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>

</asp:Content>
